<template>
	<view>
		<uni-nav-bar title="我的订单" @clickLeft="goHome" left-icon="left" backgroundColor="#fff" color="#000"
			statusBar="true"></uni-nav-bar>

		<view class="top-title-view" v-if="userTypeStatus === 0">
			<view class="tab">
				<view :class="tabIndex === index ? 'item active-color' : 'item'" v-for="(item,index) in tabList"
					:key="index" @click="selectTab(index)">
					{{item}}
				</view>
			</view>
		</view>

		<view class="tab1">
			<image src="@/static/index-message/switch1.png" mode="" class="img"></image>
			<picker mode=selector @change="selectProject" range-key="name" :value="id" :range="projectList">
				{{projectName}}
			</picker>
		</view>

		<view class="tab2">
			<image src="@/static/index-message/switch3.png" mode="" class="img"></image>
			<picker mode=selector @change="selectRoles" range-key="name" :value="userTypeStatus" :range="rolesList">
				{{rolesName}}
			</picker>
		</view>

		<view class="main" v-if="userTypeStatus === 0">
			<scroll-view class="scrollheight" @scrolltolower="handleScrolltolowerone()" scroll-y="true"
				:style="{height:setcollapseheight() + 'px'}">
				<view v-if="dateList.length>0">
					<view class="contentItem" v-for="(item,index) in dateList" :key="item.orderNo">
						<template>
							<!-- 已接单 -->
							<view class="whoCancel"
								v-if="item.orderStatus === 'ACCEPT' || item.orderStatus === 'ACCEPT_CLOSING' || item.orderStatus === 'DOING' || item.orderStatus === 'DOING_CLOSING' || item.orderStatus === 'DONE'">
								<template v-if="item.closeApply !== null">
									<template v-if="item.closeApply && item.closeApply.status === 'TBC'">
										<view
											v-if="item.closeApply && item.closeApply.applyPersonType === 'SERVER_SIDE'">
											服务方申请取消订单
										</view>
										<view
											v-else-if="item.closeApply && item.closeApply.applyPersonType === 'ORDER_SIDE'">
											等待服务方同意您的取消申请
										</view>
									</template>
									<template
										v-else-if="item.closeApply.status === 'REJECT' && item.closeApply.applyPersonType === 'ORDER_SIDE'">
										<view>
											服务方拒绝了您的取消申请
										</view>
									</template>
								</template>
							</view>
							<!-- 投诉中 -->
							<view class="whoCancel"
								v-if="item.orderStatus == 'ACCEPT_APPEAL' || item.orderStatus == 'DOING_APPEAL' || item.orderStatus == 'DONE_APPEAL'">
								<view>
									订单投诉中，请等待运营方解决
								</view>
							</view>
							<!-- 调度中 -->
							<view class="whoCancel"
								v-if="item.orderStatus == 'ACCEPT_DISPATCHING' || item.orderStatus == 'DOING_DISPATCHING'">
								<view v-show="true">
									调度中
								</view>
							</view>
							<!-- 已取消 -->
							<view class="whoCancel" v-if="item.orderStatus == 'CLOSE'">
								<view v-if="item.closeApply !== null">
									取消发起人：
									<template>
										<template
											v-if="item.closeApply && item.closeApply.applyPersonType === 'ORDER_SIDE'">
											下单方
										</template>
										<template
											v-else-if="item.closeApply && item.closeApply.applyPersonType === 'SERVER_SIDE'">
											服务方
										</template>
										<template
											v-else-if="item.closeApply && item.closeApply.applyPersonType === 'SERVER_DISPATCH_SIDE'">
											服务调度方
										</template>
										<template v-else>
											服务运营方
										</template>
									</template>
								</view>
							</view>
						</template>

						<view class="header">
							<view class="vertical-line"></view>
							<view class="title">
								订单编号：
							</view>
							<view class="orderNo">
								{{item.orderNo}}
							</view>
							<view class="copy">
								<image class="copy-img" src="@/static/socialized-service/farm-service/copy.svg"
									@click="copyText(item.orderNo)"></image>
							</view>
						</view>

						<view class="container"
							v-if="item.serviceProjectName === '翻耕整地' || item.serviceProjectName === '机插秧' || item.serviceProjectName === '作物收割' || item.serviceProjectName === '作物播种' || item.serviceProjectName === '无人机打药' || item.serviceProjectName === '秸秆离田'">
							<view class="img">
								<image src="@/static/index-message/liulanliang.png"></image>
							</view>
							<view class="text">
								<view class="title" style="width: 200rpx;">
									服务项目名称：
								</view>
								<view class="description" style="width: calc(100% - 280rpx);">
									{{item.serviceProjectName}}
								</view>
							</view>
						</view>
						<template
							v-if="item.serviceProjectName === '翻耕整地' || item.serviceProjectName === '机插秧'   ||  item.serviceProjectName === '作物收割' || item.serviceProjectName === '作物播种' || item.serviceProjectName === '无人机打药' || item.serviceProjectName === '秸秆离田'">
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/cropName.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										作物名称：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderObjName ? item.orderObjName : '不限'}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										联系人：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.contactName">
										{{item.contactName}}
									</view>
									<view class="description" style="width: calc(100% - 220rpx);" v-else>
										联系人：{{undefined}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										联系电话：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.contactPhone}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										服务地址：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression ==='addressArea').length > 0">
										{{item.properties.filter(el=>el.expression ==='addressArea')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/static/index-message/jigou.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										详细地址：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression === 'addressInfo').length > 0">
										{{item.properties.filter(el=>el.expression === 'addressInfo')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.serviceProjectName ">
								<view class="img4">
									<image src="@/subPage1/static/service-order/mushu.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										服务亩数：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression === 'rate').length > 0">
										{{item.properties.filter(el=>el.expression === 'rate')[0].numValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/price.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										预计价格：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderAmount}}
									</view>
								</view>
							</view>
							<view class="container"
								v-if="item.orderStatus === 'DONE' || item.orderStatus === 'PAID' || item.orderStatus === 'COMMENTED' || item.orderStatus === 'END'">
								<view class="img4">
									<image src="@/subPage1/static/service-order/mushu.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										实际服务亩数：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties">
										{{item.properties.filter(el=>el.expression === 'payRate')[0].numValue}}
									</view>
								</view>
							</view>
							<view class="container"
								v-if="item.orderStatus === 'DONE' || item.orderStatus === 'PAID' || item.orderStatus === 'COMMENTED' || item.orderStatus === 'END'">
								<view class="img">
									<image src="@/static/index-message/price.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										实际价格：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.payAmount}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望开始时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望结束时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceEnd">
										{{item.serviceEnd !== 'null' ? formatTime(item.serviceEnd) : ''}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'">
								<view class="img4">
									<image src="@/subPage1/static/service-order/machinery.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										自选农机：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties">
										{{item.servicerDeviceName}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'">
								<view class="img3">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务人：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerName}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'"
								:style="{'margin-bottom': item.orderStatus === 'CLOSE' ? '0' : '10rpx'}">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务电话：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerPhone}}
									</view>
								</view>
							</view>
							<view class="container" style="margin-bottom: 10rpx;" v-if="item.orderStatus === 'CLOSE'">
								<view class="img4">
									<image src="@/static/index-message/liulanliang.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										取消时间：
									</view>
									<view class="description1" v-if="item.closeApply !== null">
										{{item.closeApply.timestamp}}
									</view>
								</view>
							</view>
						</template>
						<template v-if="item.serviceProjectName === '农机租赁' || item.serviceProjectName === '设施租赁'">
							<view class="container" v-if="item.serviceProjectName === '设施租赁'">
								<view class="img4">
									<image src="@/static/index-message/arableName.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										设施名称：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties">
										{{item.properties.filter(el=>el.expression === 'relateSiteName')[0].textValue}}
									</view>
									<view class="absolute" @click="showArableInfo(item)">
										设施详情
										<u-icon name="arrow-right" color="#002A88" size="28"></u-icon>
									</view>
								</view>
							</view>
							<view class="container" v-if="item.serviceProjectName === '农机租赁'">
								<view class="img4">
									<image src="@/subPage1/static/service-order/machinery.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										租赁农机名称：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties">
										{{item.servicerDeviceName}}
									</view>
									<view class="absolute" @click="showArableInfo(item)">
										农机详情
										<u-icon name="arrow-right" color="#002A88" size="28"></u-icon>
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										租赁开始时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										租赁结束时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceEnd">
										{{item.serviceEnd !== 'null' ? formatTime(item.serviceEnd) : ''}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/price.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										租赁价格：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderAmount}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/static/index-message/jigou.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										服务机构：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.organization">
										{{item.organization.name}}
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										服务地址：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.organization">
										{{item.organization.address}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'">
								<view class="img3">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务人：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerName}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'" style="margin-bottom: 10rpx;">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务电话：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerPhone}}
									</view>
								</view>
							</view>
						</template>
						<template v-if="item.serviceProjectName === '农产品收购'">
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/arableName.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										收购作物名称：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderObjName ? item.orderObjName : '不限'}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/shougou.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										收购方式：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties">
										{{item.properties.filter(el=>el.expression === 'buyMethod')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										站点位置：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.organization">
										{{item.organization.address}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/processingVolume.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										收购量：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderObjName}}{{item.properties.filter(el=>el.expression === 'rate')[0].numValue}}斤
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/price.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										预计价格：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderAmount}}元
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望服务时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'">
								<view class="img3">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务人：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerName}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'" style="margin-bottom: 10rpx;">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务电话：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerPhone}}
									</view>
								</view>
							</view>
						</template>
						<template v-if="item.serviceProjectName === '维保服务'">
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										农机类型：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);" v-if="item.properties && item.properties.filter(el=>el.expression ==='equipmentTypeName').length > 0"> 
										{{item.properties.filter(el=>el.expression =='equipmentTypeName')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										维保类型：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression ==='maintenanceType').length > 0">
										{{ item.properties.filter(el => el.expression === 'maintenanceType')[0].textValue === '0' ? '服务点维保' : '上门维保' }}
									</view>
								</view>
							</view>


							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										联系人：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.properties.filter(el=>el.expression =='contactName')[0].textValue}}
									</view>
								</view>
							</view>

							<view class="container">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										联系电话：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.properties.filter(el=>el.expression =='contactPhone')[0].textValue}}
									</view>
								</view>
							</view>

							<view class="container">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										服务地址：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression ==='addressArea').length > 0">
										{{item.properties.filter(el=>el.expression ==='addressArea')[0].textValue}}
									</view>
								</view>
							</view>

							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望开始时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望结束时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceEnd">
										{{item.serviceEnd !== 'null' ? formatTime(item.serviceEnd) : ''}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image class="left-img" src="@/static/index-message/beizhu.svg" mode="heightFix">
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										备注：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.properties.filter(el=>el.expression =='remark')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container" style="margin-bottom: 10rpx;" v-if="item.orderStatus === 'CLOSE'">
								<view class="img4">
									<image src="@/static/index-message/liulanliang.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										取消时间：
									</view>
									<view class="description1" v-if="item.closeApply !== null">
										{{item.closeApply.timestamp}}
									</view>
								</view>
							</view>
						</template>

						<template v-if="item.serviceProjectName === '封存服务'">
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/njfc.svg"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										农机类型：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);" v-if="item.properties && item.properties.filter(el=>el.expression ==='equipmentTypeName').length > 0">
										{{item.properties.filter(el=>el.expression =='equipmentTypeName')[0].textValue}}
									</view>
								</view>
							</view>

							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/fclx.svg" mode="heightFix"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										封存类型：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression ==='storeType').length > 0">
										{{ item.properties.filter(el => el.expression === 'storeType')[0].textValue === '0' ? '服务点封存' : '上门封存' }}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										联系人：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.properties.filter(el=>el.expression =='contactName')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										联系电话：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.properties.filter(el=>el.expression =='contactPhone')[0].textValue}}
									</view>
								</view>
							</view>

							<view class="container">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										服务地址：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression ==='addressArea').length > 0">
										{{item.properties.filter(el=>el.expression ==='addressArea')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望开始时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望结束时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceEnd">
										{{item.serviceEnd !== 'null' ? formatTime(item.serviceEnd) : ''}}
									</view>
								</view>
							</view>



							<view class="container">
								<view class="img4">
									<image class="left-img" src="@/static/index-message/beizhu.svg" mode="heightFix">
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										备注：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.properties.filter(el=>el.expression =='remark')[0].textValue}}
									</view>
								</view>
							</view>

							<view class="container" style="margin-bottom: 10rpx;" v-if="item.orderStatus === 'CLOSE'">
								<view class="img4">
									<image src="@/static/index-message/liulanliang.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										取消时间：
									</view>
									<view class="description1" v-if="item.closeApply !== null">
										{{item.closeApply.timestamp}}
									</view>
								</view>
							</view>






						</template>


						<template v-if="item.serviceProjectName === '农产品加工'">
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										加工项目名称：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);">
										{{item.orderObjName}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/cropName.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										加工作物：
									</view>
									<view class="description" style="width: calc(100% - 280rpx);"
										v-if="item.properties && item.properties.filter(el=>el.expression =='relatePlantName').length > 0">
										{{item.properties.filter(el=>el.expression =='relatePlantName')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										加工位置：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.organization">
										{{item.organization.address}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img4">
									<image src="@/static/index-message/processingVolume.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										加工量：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderObjName}}{{item.properties.filter(el=>el.expression === 'rate')[0].numValue}}斤
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/price.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										预计价格：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderAmount}}元
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'">
								<view class="img3">
									<image src="@/static/index-message/jingliren.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务人：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerName}}
									</view>
								</view>
							</view>
							<view class="container" v-if="item.orderStatus !== 'START'">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务电话：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.servicerPhone}}
									</view>
								</view>
							</view>
							<view class="container" style="margin-bottom: 10rpx">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										期望服务时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
						</template>
						<template v-if="item.serviceProjectName === '直播带货'">
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/arableName.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 100rpx;">
										主播：
									</view>
									<view class="description"
										v-if="item.serviceProperties && item.serviceProperties.filter(el => el.expression === 'serviceName')">
										{{item.serviceProperties.filter(el => el.expression === 'serviceName')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img4">
									<image src="@/static/index-message/unit.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										直播开始时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceBegin) : ''}}
									</view>
								</view>
							</view>
							<view class="container"
								:style="{'margin-bottom': item.orderStatus === 'START' ? '10rpx' : ''}">
								<view class="img4">
									<image src="@/static/index-message/endTime.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										直播结束时间：
									</view>
									<view class="description1" style="width: calc(100% - 280rpx);"
										v-if="item.serviceBegin">
										{{item.serviceBegin !== 'null' ? formatTime(item.serviceEnd) : ''}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img">
									<image src="@/static/index-message/price.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										预计价格：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{item.orderAmount}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/static/index-message/jigou.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										服务机构：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										{{getProperties(item.properties, 'providerName')}}
									</view>
								</view>
							</view>
							<view class="container">
								<view class="img3">
									<image src="@/subPage1/static/service-order/jutidizhi.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 200rpx;">
										服务地址：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										<!-- {{item.organization.address}} -->
										{{getProperties(item.properties, 'providerAddress')}}
									</view>
								</view>
							</view>
							<view class="container" style="margin-bottom: 10rpx">
								<view class="img4">
									<image src="@/subPage1/static/machinery/lianxidianhua.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										服务电话：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);">
										<!-- {{item.servicerPhone}} -->
										{{getProperties(item.serviceProperties, 'servicePhone')}}
									</view>
								</view>
							</view>
							<view class="container" style="margin-bottom: 10rpx">
								<view class="img4">
									<image src="@/static/index-message/shougou.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;margin-left: 26rpx;">
										带货产品：
									</view>
									<view class="description" style="width: calc(100% - 220rpx);"
										v-if="item.serviceProperties && item.serviceProperties.filter(el => el.expression === 'servicePhone')">
										{{item.properties.filter(el => el.expression === 'goods')[0].textValue}}
									</view>
								</view>
							</view>
							<view class="container" style="margin-bottom: 10rpx;" v-if="item.orderStatus === 'CLOSE'">
								<view class="img4">
									<image src="@/static/index-message/liulanliang.png"></image>
								</view>
								<view class="text">
									<view class="title" style="width: 140rpx;">
										取消时间：
									</view>
									<view class="description1" v-if="item.closeApply !== null">
										{{item.closeApply.timestamp}}
									</view>
								</view>
							</view>
						</template>
						<!-- 按钮操作 -->
						<Opeates :key="opeateId" :status="item.orderStatus" :complainApply="item.complainApply"
							:closeApply="item.closeApply" :serviceProjectNo='item.serviceProjectNo'
							:evaluated="item.evaluated" :orderId="item.orderNo" :id="item.id"
							:serviceProjectName="item.serviceProjectName" :orderRow="item">
						</Opeates>
					</view>
				</view>
				<view v-else>
					<view class="blank">
						<image src="@/static/blank.png" mode=""></image>
						<view class="nodata">
							暂无数据
						</view>
					</view>
				</view>
				<view class="bottom-ios-lineline">

				</view>
				<view class="bottom-ios-line">

				</view>
			</scroll-view>
		</view>

		<MyOrder :userTypeStatus="userTypeStatus" :serviceProjectNo="serviceProjectNo"></MyOrder>

		<bottomTabar></bottomTabar>

		<u-popup :show="showPop" :round="10" mode="bottom" width="100%" height="100%" :closeable="false"
			@close="showPop=false">
			<view class="popUpOperate">
				<view class="center">
					设施详情
				</view>
			</view>
			<scroll-view scroll-y="true" :style="{height:setcollapseheight() - 130 + 'px'}" style="margin-top: 10rpx;">
				<view class="popTop">
					<view class="first">
						<view class="popItemTop">
							<image :src="arableInfo.groundPicture" mode="" v-if="arableInfo.groundPicture"></image>
							<image src="@/static/machinery/xuangeng.png" mode="" v-else></image>
						</view>
					</view>
					<view class="tip">
						*图片仅供参考，以实际设施为准
					</view>
					<view class="title">
						{{arableInfo.groundName}}
					</view>
				</view>
				<view class="gray"></view>
				<view class="popBottom">
					<view class="title">
						场地信息
					</view>
					<view class="info" v-show="arableInfo.unitPrice">
						预计价格：{{arableInfo.unitPrice}}元
					</view>
					<view class="info" v-show="arableInfo.payAmount">
						实际价格：{{arableInfo.payAmount}}元
					</view>
					<view class="info">
						租赁天数：{{arableInfo.leaseDayNum}}天
					</view>
					<view class="info">
						联系电话：{{arableInfo.servicePhone}}
					</view>
				</view>
			</scroll-view>
		</u-popup>

		<u-popup class="popUp" :show="showPop1" :round="10" mode="bottom" width="100%" height="100%" :closeable="false"
			@close="showPop1=false">
			<view class="popUpOperate">
				<view class="center">
					农机详情
				</view>
			</view>
			<scroll-view scroll-y="true" :style="{height:setcollapseheight() - 130 + 'px'}" style="margin-top: 10rpx;">
				<view class="popTop" @click="popConfirm()">
					<view class="first" v-if="equipmentInfo.pic">
						<image :src="equipmentInfo.pic" mode=""></image>
					</view>
					<view class="first" v-else>
						<view class="popItemTop">
							<template v-if="nowEquipmentName.includes('旋')">
								<image src="@/static/machinery/xuangeng.png" mode=""></image>
							</template>
							<template v-else-if="nowEquipmentName.includes('拖拉')">
								<image src="@/static/machinery/tuola.png" mode=""></image>
							</template>
							<template v-else-if="nowEquipmentName.includes('打捆')">
								<image src="@/static/machinery/dakun.png" mode=""></image>
							</template>
							<template v-else-if="nowEquipmentName.includes('插秧')">
								<image src="@/static/machinery/chayang.png" mode=""></image>
							</template>
							<template v-else-if="nowEquipmentName.includes('洒肥')">
								<image src="@/static/machinery/safei.png" mode=""></image>
							</template>
							<template v-else>
								<image src="@/static/machinery/shouge.png" mode=""></image>
							</template>
						</view>
					</view>
					<view class="tip">
						*图片仅供参考，以实际农机为准
					</view>
					<view class="title">
						{{equipmentInfo.equipmentName}}
					</view>
				</view>
				<view class="gray"></view>
				<view class="popBottom">
					<view class="title">
						农机资料
					</view>
					<view class="info" v-show="equipmentInfo.unitPrice">
						预计价格：{{equipmentInfo.unitPrice}}元
					</view>
					<view class="info" v-show="equipmentInfo.payAmount">
						实际价格：{{equipmentInfo.payAmount}}元
					</view>
					<view class="info">
						租赁天数：{{equipmentInfo.leaseDayNum}}天
					</view>
				</view>
			</scroll-view>
		</u-popup>

		<view class="bottom-ios-line"></view>
	</view>
</template>

<script>
	import API from '@/api/socialized-servce/farm-service/normalUser/myOrder/index.js'
	import bottomTabar from '../../components/normalUser-tabar/index.vue'
	import API2 from '@/api/socialized-servce/farm-service/user/selectAnchor/index.js'
	import MyOrder from '@/subPage1/socialized-service/farm-service/mechanist/my-order/my-order'
	import Opeates from './components/pop-opeate/index.vue'
	import {
		addressList
	} from '@/subPage1/plugins/address.js'
	export default {
		components: {
			bottomTabar,
			Opeates,
			MyOrder
		},
		data() {
			return {
				personmessage: '',
				equipmentList: [],
				equipmentTypeName: '',
				status: '',
				statusList: [],
				page: 1,
				total: 0,
				tabList: ['待接单', '已接单', '服务中', '已完成', '已取消'],
				tabIndex: 0,
				dateList: [],
				showPop: false,
				showPop1: false,
				arableInfo: {},
				equipmentInfo: {},
				nowEquipmentName: '',
				rolesList: [],
				rolesName: '用户角色',
				userTypeStatus: 0,
				projectList: [],
				serviceProjectNo: '',
				id: null,
				projectName: '',
				opeateId: null,
				firstLoad: true
			}
		},
		mounted() {
			this.getMachineryTypeList()
			this.setcollapseheight()
			uni.$on('updateOrder', () => {
				this.selectTab(this.tabIndex)
			})
		},
		onPullDownRefresh() {
			this.page = 1
			this.getMyOreder()
			setTimeout(function() {
				uni.stopPullDownRefresh()
				uni.showToast({
					title: '刷新成功',
					icon: 'success',
					duration: 1000
				});
			}, 1000)
		},


		created() {
			let arr = []
			let arr1 = []

			arr = JSON.parse(uni.getStorageSync('userTypeNameList'))
			arr1.push('用户角色')
			arr = arr.filter(el => el !== '专家')
			if (arr.includes('农机手') || arr.includes('主播')) {
				arr1.push('农机手/主播')
			}

			arr1.forEach((el, index) => {
				this.rolesList.push({
					name: el,
					id: index
				})
			})

			if (uni.getStorageSync('userTypeStatus')) {
				this.userTypeStatus = uni.getStorageSync('userTypeStatus')
				this.rolesName = this.rolesList.filter(el => el.id === this.userTypeStatus)[0].name
			}

			this.getProjectList()

		},
		onLoad(e) {
			this.personmessage = e.personmessage
			if (e.orderStatus) {
				let index = '',
					orderStatus = e.orderStatus
				if (orderStatus == 'START') {
					index = 0
				} else if (['ACCEPT', 'ACCEPT_CLOSING', 'ACCEPT_APPEAL', 'ACCEPT_DISPATCHING'].includes(orderStatus)) {
					index = 1
				} else if (['DOING', 'DOING_CLOSING', 'DOING_DISPATCHING', 'DOING_APPEAL', 'DONE', 'DONE_APPEAL'].includes(
						orderStatus)) {
					index = 2
				} else if (['PAID', 'COMMENTED', 'END'].includes(orderStatus)) {
					index = 3
				} else if (orderStatus == 'CLOSE') {
					index = 4
				}
				(index || index == 0) && uni.setStorageSync('formServiceOrderTabIndex', index)
				// (index || index == 0) && this.selectTab(index)
			}
			if (e.orderNo) {

			}
			if (e.personType == 'ORDER_SIDE') {
				uni.setStorageSync('userTypeStatus', 0)
			} else if (e.personType == 'SERVER_SIDE') {
				uni.setStorageSync('userTypeStatus', 1)
			}
			if (e.serviceProjectNo) {
				this.firstLoad = false
				this.serviceProjectNo = e.serviceProjectNo
			}
		},
		methods: {
			// 维保农机类型
			async getMachineryTypeList() {
				let res = await API2.queryMachineryType(uni.getStorageSync('organizationNo'))
				if (res.code === 200) {
					this.equipmentList.push(...res.data);
				}
			},
			getequipmentTypeName(id) {
				console.log()
				for (let i = 0; i < this.equipmentList.length; i++) {
					if (this.equipmentList[i].id == id) {
						return this.equipmentList[i].equipmentTypeName
					}
				}
			},
			// 切换项目
			selectProject(e) {
				let num = e.detail.value * 1
				if (isNaN(num)) {
					num = 0
				}
				this.projectName = this.projectList[num].name
				this.id = this.projectList[num].id
				this.serviceProjectNo = this.projectList[num].serviceProjectNo
				uni.setStorageSync('serviceProjectNos', this.serviceProjectNo)
				// 模板
				this.getCancelReasonTemplate(this.serviceProjectNo)
				let index = uni.getStorageSync('formServiceOrderTabIndex')
				if (index) {
					this.tabIndex = index
					this.selectTab(index * 1)
				} else {
					this.selectTab(0)
				}

			},
			// 切换角色
			selectRoles(e) {
				this.rolesName = this.rolesList[e.detail.value].name
				this.userTypeStatus = e.detail.value
				uni.setStorageSync('userTypeStatus', this.userTypeStatus)

				let index = uni.getStorageSync('formServiceOrderTabIndex')
				if (index) {
					this.tabIndex = index
					this.selectTab(index * 1)
				} else {
					this.selectTab(0)
				}
			},
			async getMyOreder(status = this.status, list = this.statusList) {
				this.opeateId = Math.random(0, 1)
				if (this.statusList.length > 0) {
					let params = {
						page: this.page,
						size: 10,
						condition: {
							orderStatusList: this.statusList,
							baseServiceProjectNo: this.serviceProjectNo,
							serviceProviderNo: uni.getStorageSync('serviceProviderNo')
						}
					}

					let res = await API.queryMyOrder(params)
					this.total = res.data.totalElements
					this.dateList = res.data.content
				}
				if (this.status || this.status !== '') {
					let params = {
						page: this.page,
						size: 10,
						condition: {
							orderStatus: this.status,
							baseServiceProjectNo: this.serviceProjectNo,
							serviceProviderNo: uni.getStorageSync('serviceProviderNo')
						}
					}
					let res = await API.queryMyOrder(params)
					this.total = res.data.totalElements
					this.dateList = res.data.content
				}
			},




			// 先这样分开吧,有点乱
			async handleScrolltolowerone() {
				console.log(`触底--目前---total:${this.total}---page:${this.page}`);
				if (this.dateList.length < this.total) {
					this.page++
					let params = {}
					if (this.statusList.length > 0) {
						params = {
							page: this.page,
							size: 10,
							condition: {
								orderStatusList: this.statusList,
								baseServiceProjectNo: this.serviceProjectNo,
								serviceProviderNo: uni.getStorageSync('serviceProviderNo')
							}
						}
					}
					if (this.status !== '' && this.statusList.length === 0) {
						params = {
							page: this.page,
							size: 10,
							condition: {
								orderStatus: this.status,
								baseServiceProjectNo: this.serviceProjectNo,
								serviceProviderNo: uni.getStorageSync('serviceProviderNo')
							}
						}
					}
					let res = await API.queryMyOrder(params)
					if (res.code === 200) {
						let newList = res.data.content
						this.dateList = [...this.dateList, ...newList]
					}
					console.log(`total：${this.total}---page：${this.page}---实际数组：${this.dateList.length}`);
				}
			},


			// tab切换
			selectTab(index) {
				uni.setStorageSync('formServiceOrderTabIndex', index)
				this.tabIndex = index
				this.status = ''
				this.statusList = []
				this.dateList = []
				this.page = 1
				if (index === 0) {
					this.status = 'START'
				} else if (index === 1) {
					this.statusList = ['ACCEPT', 'ACCEPT_CLOSING', 'ACCEPT_APPEAL', 'ACCEPT_DISPATCHING']
				} else if (index === 2) {
					this.statusList = ['DOING', 'DOING_CLOSING', 'DOING_DISPATCHING', 'DOING_APPEAL',
						'DONE', 'DONE_APPEAL'
					]
				} else if (index === 3) {
					this.statusList = ['PAID', 'COMMENTED', 'END']
				} else if (index === 4) {
					this.status = 'CLOSE'
				}
				if (this.userTypeStatus === 0) {
					this.getMyOreder()
				}
			},
			// 更新订单列表
			// updateOrder() {
			// 	this.selectTab(this.tabIndex)
			// },
			// 获取项目列表
			async getProjectList() {
				let params = {
					topTag: true,
					providerTag: true
				}
				let res = await API.queryProject(params)
				if (res.code == 200) {
					this.projectList = res.data
					this.projectList.forEach((el, index) => {
						el.id = index * 1
					})
					// 获取项目模板
					this.getCancelReasonTemplate(res.data[0].serviceProjectNo)
					if (this.firstLoad) { // 消息中心传参跳转
						this.serviceProjectNo = uni.getStorageSync('serviceProjectNos')
					}
					if (this.serviceProjectNo) {
						let row = res.data.find(el => {
							return el.serviceProjectNo == this.serviceProjectNo
						})
						console.log(111, row)

						if (row) {
							this.projectName = row.name
							this.id = row.id
						} else {
							this.projectName = res.data[0].name
							this.serviceProjectNo = res.data[0].serviceProjectNo
						}
					} else {
						this.projectName = res.data[0].name
						this.serviceProjectNo = res.data[0].serviceProjectNo
					}
					let index = uni.getStorageSync('formServiceOrderTabIndex')
					if (index > 0) {
						this.tabIndex = index
						this.selectTab(index * 1)
					} else {
						this.selectTab(0)
					}
				}
			},
			async getCancelReasonTemplate(serviceProjectNo) {
				let res = await API.queryCancelReasonTemplate(serviceProjectNo)
				if (res.code === 200) {
					uni.setStorageSync('radiolist1', res.data)
				}
				let res1 = await API.queryComplainReasonTemplate(serviceProjectNo)
				if (res1.code === 200) {
					uni.setStorageSync('radiolist2', res1.data)
				}
			},
			setcollapseheight() {
				let topheightone = uni.upx2px(260)
				let winHeight = 0
				uni.getSystemInfo({
					success: function(res) {
						winHeight = res.windowHeight
					}
				});
				let oldHeight = uni.upx2px(136)
				winHeight = parseInt(winHeight) - topheightone - oldHeight
				// #ifndef APP-PLUS
				winHeight = winHeight + 40
				// #endif
				return winHeight
			},
			goHome() {
				let url = ''
				if (this.personmessage === 'personmessage') {
					url = '/pages/socialized-service/person-message/person-message'
				} else {
					url = '/pages/socialized-service/selection-system/selection-system'
				}
				uni.switchTab({
					url: url
				})
			},
			formatTime(time) {
				let Y = time.slice(0, 4) + '-'
				let M = time.slice(4, 6) + '-'
				let D = time.slice(6, 8) + ' '
				let h = time.slice(8, 10) + ':'
				let m = time.slice(10, 12) + ':'
				let s = time.slice(12)
				return Y + M + D + h + m + s
			},

			showArableInfo(item) {
				if (item.serviceProjectName === '设施租赁') {
					item.properties.forEach(el => {
						if (el.expression === 'contactPhone') {
							this.arableInfo.servicePhone = el.textValue
						}
						if (el.expression === 'expectPrice') {
							this.arableInfo.unitPrice = el.numValue
						}
						if (el.expression === 'payAmount') {
							this.arableInfo.payAmount = el.numValue
						}
						if (el.expression === 'relateSiteName') {
							this.arableInfo.groundName = el.textValue
						}
						if (el.expression === 'days') {
							this.arableInfo.leaseDayNum = el.numValue
						}
					})
					item.serviceProperties.forEach(el => {
						if (el.expression === 'groundPicture') {
							this.arableInfo.groundPicture = el.textValue
						}
					})
					this.showPop = true
				} else {
					item.properties.forEach(el => {
						if (el.expression === 'expectPrice') {
							this.equipmentInfo.unitPrice = el.numValue
						}
						if (el.expression === 'payAmount') {
							this.equipmentInfo.payAmount = el.numValue
						}
						if (el.expression === 'relateDeviceName') {
							this.equipmentInfo.equipmentName = el.textValue
						}
						if (el.expression === 'days') {
							this.equipmentInfo.leaseDayNum = el.numValue
						}
					})
					this.showPop1 = true
				}

			},
			copyText(text) {
				// 将文本设置到剪贴板
				uni.setClipboardData({
					data: text,
					success: () => {
						// 可以添加用户友好的提示，例如使用uni.showToast提示复制成功
						uni.showToast({
							title: '复制成功',
							icon: 'success',
							duration: 2000
						});
					}
				});
			},
			getProperties(properties, field) {
				let obj = properties.find(el => el.expression === field)
				return obj ? obj.textValue || obj.numValue : ''
			}
		}
	}
</script>

<style lang="scss" scoped>
	// tab栏
	.top-title-view {
		position: fixed;
		width: 95%;
		height: 58rpx;
		margin-top: 10rpx;
		left: 50%;
		transform: translateX(-50%);
		z-index: 99;

		.tab {
			display: flex;
			width: 100%;
			height: 100%;
			background-color: #E2E2E2;
			border-radius: 30rpx 30rpx 30rpx 30rpx;
			overflow: hidden;

			.item {
				height: 100%;
				width: 50%;
				background-color: #E2E2E2;
				border-radius: 30rpx 30rpx 30rpx 30rpx;
				font-size: 28rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #818181;
				text-align: center;
				line-height: 58rpx;
			}

			.active-color {
				border-radius: 30rpx 30rpx 30rpx 30rpx;
				color: #fff;
				background: linear-gradient(270deg, #88ACFF 0%, #2165FF 100%);
				
			}
		}
	}

	// 角色
	.tab1 {
		position: fixed;
		display: flex;
		align-items: center;
		// #ifdef APP-PLUS
		top: 89rpx;
		// #endif
		// #ifdef H5
		top: 22rpx;
		// #endif
		right: 100rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #2265FB;
		z-index: 999;

		.img {
			width: 19rpx;
			height: 24rpx;
			margin-right: 8rpx;
		}
	}

	.tab2 {
		position: fixed;
		display: flex;
		align-items: center;
		// #ifdef APP-PLUS
		top: 89rpx;
		// #endif
		// #ifdef H5
		top: 22rpx;
		// #endif
		left: 80rpx;
		font-size: 32rpx;
		font-weight: 500;
		color: #2265FB;
		z-index: 999;

		.img {
			width: 30rpx;
			height: 30rpx;
			margin-right: 8rpx;
		}
	}

	// 主体
	.main {
		margin-top: 80rpx;

		.blank {
			position: absolute;
			width: 100%;
			top: 50%;
			transform: translateY(-50%);
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			image {
				width: 200rpx;
				height: 200rpx;
			}

			.nodata {
				margin-top: 20rpx;
			}
		}


		.contentItem {
			position: relative;
			margin: 0 40rpx;
			margin-bottom: 16rpx;
			background-color: #FFFFFF;
			padding: 20rpx 12rpx 10rpx 12rpx;
			box-shadow: 0rpx 0rpx 12rpx 2rpx rgba(0, 0, 0, 0.05);
			border-radius: 16rpx 16rpx 16rpx 16rpx;

			.whoCancel {
				position: absolute;
				right: 10rpx;
				font-size: 14px;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #FF5050;
			}

			.header {
				position: relative;
				padding-bottom: 20rpx;
				border-bottom: 2rpx solid #EFEFEF;
				color: #91743E;

				.copy {
					position: absolute;
					top: 46rpx;
					right: 6rpx;

					.copy-img {
						width: 40rpx;
						height: 40rpx;
					}
				}

				.vertical-line {
					position: absolute;
					top: 8rpx;
					left: 0;
					width: 10rpx;
					height: 28rpx;
					background-color: #91743E;
				}

				.title {
					width: 100%;
					padding-left: 24rpx;
					font-size: 32rpx;
					font-weight: 500;
				}

				.orderNo {
					font-size: 25rpx;
					margin-top: 10rpx;
				}

			}

			.container {
				display: flex;
				align-items: flex-start;
				margin-left: 32rpx;
				margin-right: 10rpx;
				margin-top: 30rpx;
				font-size: 28rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #272727;

				.img {
					width: 35rpx;
					height: 30rpx;

					image {
						position: relative;
						z-index: 9;
						width: 35rpx;
						height: 30rpx;
					}
				}

				.img3 {
					width: 30rpx;
					height: 30rpx;

					image {
						position: relative;
						z-index: 9;
						width: 27rpx;
						height: 35rpx;
					}
				}

				.img4 {
					width: 35rpx;
					height: 35rpx;

					image {
						position: relative;
						z-index: 9;
						width: 35rpx;
						height: 35rpx;
					}
				}

				.text {
					position: relative;
					width: 100%;
					display: flex;
					overflow: hidden;

					.title {
						margin-left: 20rpx;
					}

					.description {
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: normal;
					}

					.absolute {
						position: absolute;
						right: 0;
						display: flex;
						align-items: center;
						justify-content: center;
						width: 156rpx;
						height: 38rpx;
						background: #88ACFF;
						border-radius: 10rpx 10rpx 10rpx 10rpx;
						font-size: 28rpx;
						color: #002A88;
					}
				}
			}
		}
	}

	.btn {
		z-index: 99;
		position: fixed;
		bottom: 180rpx;
		left: 50%;
		width: 340rpx;
		transform: translateX(-50%);
		height: 80rpx;
		padding-bottom: env(safe-area-inset-bottom);
	}

	.scrollheight {
		position: relative;
		box-sizing: border-box;
	}

	/deep/ .u-upload__deletable__icon {
		top: 8rpx;
		right: 4rpx;
		transform: scale(1.7);
	}

	.popUpOperate {
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
		height: 100rpx;
		padding: 0 20rpx;
		border-bottom: 1px solid #ccc;

		.center {
			font-weight: 700;
		}
	}

	.popTop {
		padding: 0 20rpx;
		margin-bottom: 30rpx;

		.first {
			display: flex;
			flex-wrap: wrap;
			justify-content: center;

			.popItemTop {
				width: 65%;
				height: 350rpx;
				margin-right: calc(4% / 2);
				margin-bottom: 20rpx;

				&:nth-child(3n) {
					margin-right: 0;
				}

				image {
					width: 100%;
					height: 100%;
				}
			}
		}

		.tip {
			color: #d9001b;
			margin-bottom: 20rpx;
		}

		.title {
			font-size: 32rpx;
			font-weight: 700;
			margin-bottom: 20rpx;
		}
	}

	.gray {
		height: 20rpx;
		width: 100%;
		background-color: #ccc;
	}

	.popBottom {
		padding: 20rpx;

		.title {
			font-weight: 700;
			font-size: 32rpx;
		}

		.info {
			margin: 10rpx;
		}
	}

	/deep/ .uni-navbar__header-btns {
		width: 48rpx;
	}
</style>